<%--
  Created by IntelliJ IDEA.
  User: w7851
  Date: 2018/5/15
  Time: 10:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%
    String result = request.getParameter("result");
    String uid = request.getParameter("uid");
    String dianhua = request.getParameter("dianhua");
    String mima = request.getParameter("passwd");

    boolean isWeixin = false;
    String ua = request.getHeader("user-agent")
            .toLowerCase();
    if (ua.indexOf("micromessenger") > 0) {
        isWeixin = true;
    } else {
        isWeixin = false;
    }

    if (result == null) {
        result = "error";
    }
    boolean regok;
    if (result.equals("ok")) {
        regok = true;
    } else {
        regok = false;
    }
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>提示</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>

    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>

    <link rel="stylesheet" href="/css/ydui.css">
    <script src="/js/ydui.flexible.js"></script>
    <style type="text/css">
        .regmsg {
            font-size: 0.35rem;
            margin: 4px;
        }
    </style>
</head>
<body>
<div class="g-flexview">
    <header class="m-navbar  navbar-fixed">
        <%--<a onclick="goback()" class="navbar-item">--%>
        <%--<i class="back-ico"></i>--%>
        <%--</a>--%>
        <div class="navbar-center"><span class="navbar-title">提示</span></div>
    </header>


    <div class="g-scrollview" style="margin-top: 1rem;margin-bottom: 0.9rem">
        <%
            if (!regok) {
        %>
        <div style="margin: 16px">
            <h1>注册未能通过，请检查输入的内容是否正确！</h1>
            <h1 style="margin-top: 16px"><a onclick="goback()" style="text-decoration: underline">点此重新填写！</a></h1>
        </div>

        <%
            }
        %>
        <%------------------------%>
        <%
            if (regok) {
        %>


        <aside class="demo-tip" style="color: #b1b1b1;padding: 8px">
            <p>恭喜您<%=uid%>，注册成功</p>
            <p>您的账号为:<%=dianhua%>
            </p>
            <p>您的密码为:<%=mima%>
            </p>
            <p style="margin-top: 4px">请妥善保管用户账号和密码，避免泄露。</p>
        </aside>
        <hr style="background:#d9d9d9;border:none;height: 1px;width: 100%">

        <div style="margin-top: 16px">
            <div class="m-gridstitle">接下来您可以下载APP</div>
            <ul class="m-grids-2" style="background-color: #fff5">
                <a href="https://www.baidu.com/">
                    <li class="grids-item">
                        <div class="grids-icon">
                            <img src="/pics/android.png">
                        </div>
                        <div class="grids-txt">Android</div>
                    </li>
                </a>
                <li class="grids-item">
                    <div class="grids-icon">
                        <img src="/pics/apple.png">
                    </div>
                    <div class="grids-txt">IOS</div>
                </li>
            </ul>
        </div>
        <%
            if (isWeixin) {
        %>
        <div id="micmes" style="margin-top: 8px">
            <div class="m-gridstitle">或者转入自带浏览器并登录</div>
            <div style="padding: 0 16px"><img src="/pics/openonbro.jpg" style="width: 100%;height: auto"></div>
        </div>
        <%
        } else {
        %>
        <div id="notmicmes" style="margin-top: 8px">
            <div class="m-gridstitle">或者点击这里进行登录</div>
            <a href="/mobile"><input type="button" style="margin: 8px" class="btn-block btn-hollow" value="前往登录"/></a>
        </div>
        <%
            }
        %>

        <%
            }
        %>
        <%------------------------%>
    </div>
</div>
</body>
<script type="text/javascript">
    function goback() {
        history.go(-1);
    }
</script>
</html>
